Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix electron width/heigth when using xrandr under bullseye #3161

Merged
merged 1 commit into from
Aug 12, 2023

Conversation

khassel
Copy link
Collaborator

@khassel khassel commented Aug 12, 2023

This PR uses electron.screen.getPrimaryDisplay().workAreaSize under electron to get the screen size.

If this fails the current defaults (800x600) are used.

This solves some problems with xrandr under bullseye where the sreen comes up with 800x600 instead of fullscreen, e.g. described here.

Tested this on my pi setup.

By the way, the Issue #1919 is back on my side (not related to this PR) ...

@codecov-commenter
Copy link

Codecov Report

Merging #3161 (a3bdf52) into develop (49c72d8) will increase coverage by 0.06%.
The diff coverage is 0.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@             Coverage Diff             @@
##           develop    #3161      +/-   ##
===========================================
+ Coverage    25.53%   25.60%   +0.06%     
===========================================
  Files           53       53              
  Lines        11492    11501       +9     
===========================================
+ Hits          2935     2945      +10     
+ Misses        8557     8556       -1     
Files Changed Coverage Δ
js/electron.js 0.00% <0.00%> (ø)

... and 2 files with indirect coverage changes

@khassel khassel requested a review from rejas August 12, 2023 18:21
@rejas rejas merged commit 156db32 into MagicMirrorOrg:develop Aug 12, 2023
@khassel khassel deleted the electron-size branch August 15, 2023 21:35
rejas pushed a commit that referenced this pull request Sep 13, 2023
)

... in `config.js`.

Solves #3174 

With getting width/heigt from
`electron.screen.getPrimaryDisplay().workAreaSize` introduced with
#3161 the solution was to
remove the `setFullscreen` line.

So per default the fullscreen resolution is used but when someone now
uses `electronOptions.width`/`electronOptions.height` in `config.js`
these parameters are used and so "no fullscreen" is possible.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants